home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / AMICUS / AMICUS25.ADF / DiskWipe / mydebug.h < prev    next >
C/C++ Source or Header  |  1989-01-26  |  2KB  |  58 lines

  1. /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\
  2. * |_o_o|\\ Copyright (c) 1987 The Software Distillery.  All Rights Reserved *
  3. * |. o.| ||          Written by Doug Walker                                 *
  4. * | .  | ||          The Software Distillery                                *
  5. * | o  | ||          235 Trillingham Lane                                   *
  6. * |  . |//           Cary, NC 27511                                         *
  7. * ======             BBS:(919)-471-6436                                     *
  8. \* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
  9.  
  10. #ifndef EXTERN
  11. #define EXTERN extern
  12. #endif
  13.  
  14. #if 0
  15. #define MYDEBUG 1
  16. #endif
  17.  
  18. #ifndef DEBUGGRP
  19. #define DEBUGGRP 0
  20. #endif
  21.  
  22. #define BUG(lvl, args) BUGGRP(DEBUGGRP, lvl, args)
  23. #define BUGGETC(lvl)   BUGGGETC(DEBUGGRP, lvl)
  24. #define BUG0(lvl, args) BUGGRP(0, lvl, args)
  25. #define BUGGTC0(lvl)   BUGGGETC(0, lvl)
  26. #define BUG1(lvl, args) BUGGRP(1, lvl, args)
  27. #define BUGGTC1(lvl)   BUGGGETC(1, lvl)
  28. #define BUG2(lvl, args) BUGGRP(2, lvl, args)
  29. #define BUGGTC2(lvl)   BUGGGETC(2, lvl)
  30. #define BUG3(lvl, args) BUGGRP(3, lvl, args)
  31. #define BUGGTC3(lvl)   BUGGGETC(3, lvl)
  32. #define BUG4(lvl, args) BUGGRP(4, lvl, args)
  33. #define BUGGTC4(lvl)   BUGGGETC(4, lvl)
  34. #define BUG5(lvl, args) BUGGRP(5, lvl, args)
  35. #define BUGGTC5(lvl)   BUGGGETC(5, lvl)
  36.  
  37. #ifdef MYDEBUG
  38.  
  39. void dump(char *, int);
  40.  
  41. #define MAXDEBUG 10
  42. EXTERN int debug[MAXDEBUG];
  43.  
  44. #define BUGTEST(lvl) (lvl<=debug[DEBUGGRP])
  45.  
  46. #define BUGGRP(grp, lvl, args) {if(lvl<=debug[grp])\
  47.                                    {printf args ; fflush(stdout);}}
  48. #define BUGGGETC(grp, lvl) {if(lvl<=debug[grp])\
  49.                        {printf("Hit return to continue: ");(void)getchar();}}
  50.  
  51. #else
  52.  
  53. #define BUGTEST(grp) (0)
  54. #define BUGGRP(grp, lvl, args) {}
  55. #define BUGGGETC(grp, lvl) {}
  56.  
  57. #endif MYDEBUG
  58.